home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
tex-k
/
tex-k-archive.past
/
1995.02
/
000130_dan@tesla.psych.nyu.edu_Wed Feb 22 14:48:51 1995.msg
< prev
next >
Wrap
Internet Message Format
|
1995-02-28
|
5KB
Received: from TESLA.PSYCH.NYU.EDU by cs.umb.edu with SMTP id AA15723
(5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Wed, 22 Feb 1995 19:50:00 -0500
Received: by tesla.psych.nyu.edu (920330.SGI/920502.SGI)
for tex-k@cs.umb.edu id AA01491; Wed, 22 Feb 95 19:48:51 -0500
Date: Wed, 22 Feb 95 19:48:51 -0500
From: dan@tesla.psych.nyu.edu (Dan Karron)
Message-Id: <9502230048.AA01491@tesla.psych.nyu.edu>
To: bug-gnu-utils@prep.ai.mit.edu, bob@gnu.ai.mit.edu, tex-k@cs.umb.edu,
kb@cs.bu.edu, geoff@itcorp.com, g.kuenning@ieee.org
Subject: Shell script to intuit spooler available for testing
Reply-To: karron@nyu.edu
Dear package writers;
Here is something to beat on that tries to intuit the spooler on your
system.
The goal is to put something in autoconf that will set
a ac_print_spooler var to something that has a reasonable
chance of being correct.
I have only tested this so far on IRIX 4.05, and
IRIX 5.2. Some systems have lpr running out of the
box if you uncomment a few lines in /etc/printcap,
others never worked since I had the systems.
This will need lots of testing. Please send me transcripts and
thoughts.
Just because you have an executable somewhere does not mean
it is installed. Perhaps sending a test print job
and verifying it is on the queue, then killing it,
would be as close as you can get to a comprehensive
test. Lots of people (ME!) have only halfass installations
of lpr.
Comments welcome.
Note, I have not finished the results. Just need some
strings from lpc status under various states.
Cheers!
Dan.
#! /bin/sh
# This is a prototype script that tries to intuit
# what print spooler you have running on your system.
#
# It first scans for executables, and then
# if it finds them, it checks the status of the spoolers.
# For each spooler that has good status, it leaves ac_lp_spooler
# and ac_lpr_spooler with the full path of the spooler.
# if Both work, pick lp (my favorite), else use the operable one.
# This needs extensive testing, as I only have limited
# experience with lpr.
# please send the output and changes to karron@nyu.edu
# Eventually, I want to send this up to the autoconfig
# maintainer for inclusion into autoconf.
# Note, that I try to make messages that indicate the
# heuristic used to intuit the spooler, instead of a checking.
# Also, I make use of the Verbose variable.
#clean up path components
ac_PATH_COMPONENTS=`echo ":$PATH:" | sed 's/:/ /g;s,//,/,g;s/ / /g'`
ac_SPOOLERS_LIST="lp lpr"
ac_SPOOLERS_STATUS_LIST="lpstat lpc"
VERBOSE=1
MESSAGE=echo
for ac_j in $ac_SPOOLERS_LIST
do
for ac_i in $ac_PATH_COMPONENTS
do
if test -x $ac_i/$ac_j
then
if test $VERBOSE = 1 ; then
echo found $ac_j at $ac_i/$ac_j
fi
eval ac_SPOOL_$ac_j=$ac_i/$ac_j
break
else
if test $VERBOSE = 1 ; then
echo "- \c"
fi
fi
done
done
for ac_j in $ac_SPOOLERS_STATUS_LIST
do
for ac_i in $ac_PATH_COMPONENTS
do
if test -x $ac_i/$ac_j
then
if test $VERBOSE = 1 ; then
echo found $ac_j at $ac_i/$ac_j
fi
eval ac_SPOOLER_STATUS_$ac_j=$ac_i/$ac_j
break
else
if test $VERBOSE = 1 ; then
echo "- \c"
fi
fi
done
done
if test -n "$ac_SPOOL_lp"
then
$MESSAGE "\nchecking lp status with \"$ac_SPOOLER_STATUS_lpstat\""
if test -n "$ac_SPOOLER_STATUS_lpstat"
then
echo "\t$ac_SPOOLER_STATUS_lpstat says \c"
if test -x "$ac_SPOOLER_STATUS_lpstat"
then
ac_lpstat_results=`$ac_SPOOLER_STATUS_lpstat -r `
# echo "\"$ac_lpstat_results\"\n"
case $ac_lpstat_results in
"scheduler is running")
echo "lp ok"
break
;;
"*")echo "unrecognized message from $ac_SPOOLER_STATUS_lpstat"
echo "\"$ac_lpstat_results\"\n"
;;
esac
else
echo "unable to execute $ac_SPOOLER_STATUS_lp, something is wrong"
exit 1
fi
fi
else
echo "no lp on this system"
fi
if test -n "$ac_SPOOL_lpr"
then
echo "\nchecking lpc with \"$ac_SPOOLER_STATUS_lpc\""
if test -x $ac_SPOOLER_STATUS_lpc
then
echo "\t$ac_SPOOLER_STATUS_lpc says \c"
ac_lpc_status=`$ac_SPOOLER_STATUS_lpc status`
echo " \"$ac_lpc_status\" \n"
case $ac_lpc_status in
*"no daemon present"*)echo "no lpr daemon present"
break;;
*)echo "unrecognized lpc message:"
echo "\"$ac_lpc_status\"\n"
;;
esac
else
echo "unable to execute $ac_SPOOLER_STATUS_lpc, something is wrong"
exit 1
fi
else
echo "no lpr on this system"
fi
| karron@nyu.edu (e-mail alias)Dan Karron, Ph.D.,Research Assistant Professor|
| Phone: 212 263 5210 Fax: 212 263 7190 New York University Medical Center |
| 560 First Avenue Digital Pager <1> 212 397 9330 |
| New York, New York 10016 <2> 10896 <3> <your-number-here> |